const express = require('express');
const router = express.Router(); //创建路由对象

router.get('/user/list', (req, res) => { //挂载具体的路由
    res.send('Get user list.');
});

router.post('/user/add', (req, res) => {
    res.send('Add new user.');
});

module.exports = router; //向外暴露路由对象